package com.project.bookstore.order.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 
 * @TableName t_order
 */
@TableName(value ="t_order")
@Data
@Accessors(chain = true)
public class Order implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 订单号
     */
    private String orderNumber;

    /**
     * 实际支付金额
     */
    private BigDecimal amount;

    /**
     * 书名
     */
    private String bookName;

    /**
     * 价格
     */
    private BigDecimal price;

    /**
     * 数量
     */
    private Integer count;

    /**
     * 状态(待确认1 待付款2 待发货3 待确认收货4 退货/退款5 待评价6)
     */
    private Integer state;

    /**
     * 发货单号
     */
    private String expressOrder;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 书图url
     */
    private String bookPicture;

    /**
     * 书id
     */
    private Long bookId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 地址id
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Long addressId;

    /**
     * 创建时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private LocalDateTime created;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}